package com.txw.travel.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.txw.travel.pojo.Admin;
import com.txw.travel.pojo.Permission;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface AdminMapper extends BaseMapper<Admin> {
    Admin getAdminDetail(int id);

    List<Permission> getAdminPermissions(String username);

    //delete all admin all role
    void deleteAdminAllRoles(Integer aid);

    void addAdminRole(@Param("aid") Integer aid, @Param("rid") Integer rid);
}
